/*
@data: 2023/7/10
@author: North
@desc: test
*/
package main

import (
	"fmt"
	"math/rand"
	"time"
)


func main() {
	//定义名单
	var names = []string{"我没k", "挖煤k", "bulubiu~~","bulubiu","恐龙扛狼~~", "恐龙扛狼"}
	var sigin string
	for {
		print("输入操作(按q退出):\n")
		fmt.Scanln(&sigin)
		//输入q或names长度0退出
		if sigin == "q" || len(names) == 0 {
			break
		} else {
			//生成随机的name
			rand.Seed(time.Now().UnixNano())
			i := rand.Intn(len(names))
			fmt.Printf("抽中：%s\n",names[i])
			//删除被抽中的人
			names = append(names[:i], names[i+1:]...)
		}
	}
}
